# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=py3-scs
pkgver=3.2.0
pkgrel=0
pkgdesc="C package that solves convex cone problems via operator splitting"
url="https://github.com/cvxgrp/scs"
arch="all"
license="MIT"
depends="python3 py3-numpy py3-scipy"
makedepends="py3-setuptools py3-numpy-dev"
checkdepends="py3-pytest"
source="scs-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/s/scs/scs-$pkgver.tar.gz"
builddir="$srcdir/scs-$pkgver"
options="!check" # upstream tests broken

build() {
	python3 setup.py build
}

check() {
	python3 setup.py build_ext --inplace
	cp src/__init__.py scs
	PYTHONPATH=. pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
5cb6b69952479e1ba1593539bacc10ef4d97591c668bda0d9922c1dfcfcc7e62fa43a81b7c70bbb3ed0201db9be5594a3d40d91dab3ff3d6510d404917408491  scs-3.2.0.tar.gz
"
